//
//  NoteCacheDB.h
//  yuwei
//
//  Created by slz on 16/12/28.
//  Copyright © 2016年 youyuwei. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NoteCacheDB : NSObject

/** 单例 */
+(NoteCacheDB*)defaultNoteDB;

/** 设置KV缓存值 */
+(void)setValue:(NSString*)value forKey:(NSString*)key andType:(NSString *)type;
/** 获取KV缓存值 */
+(NSString*)valueForKey:(NSString*)key;

- (void)deleteNoteWithNoteId:(NSString *)noteId;
- (void)updateNoteWithNoteId:(NSString *)noteId andNoteJson:(NSString *)noteJson;
- (NSArray *)getAllIdArray;
- (NSArray *)getAllNoteArray;
- (NSString *)typeFromId:(NSString *)noteId;
///** 设置KV缓存值：数组 */
//+(void)setValueArray:(NSArray*)array forKey:(NSString*)key;
///** 获取KV缓存值：数组 */
//+(NSArray*)valueArrayForKey:(NSString*)key;
//
///** 设置KV缓存：字典 */
//+(void)setValueDict:(NSDictionary*)dict forKey:(NSString*)key;
///** 获取KV缓存：字典 */
//+(NSDictionary*)valueDictForKey:(NSString*)key;

/** 返回缓存数据：含创建时间、更新时间等 */
//+(CacheItem*)cacheItemForKey:(NSString*)key;


-(void)setKVNoteValue:(NSString*)value forKey:(NSString*)key andType:(NSString *)type;

-(NSString*)getKVNoteValueForKey:(NSString*)key;

@end
